{% extends "base_generic.html" %}

{% block content %}
    <h1>图书馆中的图书副本</h1>

    <ul>
      {% for bookinst in bookinstance_list %}
      <li class="{% if bookinst.is_overdue %}text-danger{% endif %}">
        <a href="{% url 'bookinstance-detail' bookinst.pk %}">{{bookinst.book.title}}</a> ({{ bookinst.get_status_display }})
        {% if bookinst.status != 'a' %}: {{ bookinst.due_back }} {% endif %}
        {% if bookinst.status == 'o' %}
          {% if user.is_staff %}- {{ bookinst.borrower }}{% endif %} {% if perms.catalog.can_mark_returned %}- <a href="{% url 'renew-book-librarian' bookinst.id %}">续借</a> {% endif %}
        {% endif %}
      </li>
      {% empty %}
      <li>没有可用的图书副本。</li>
      {% endfor %}
    </ul>

{% endblock %}
